package com.yyt.database_demo.domain;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 联合主键
 * 
 * @author yeyangtao
 * @date 2020/5/30 19:11
 */
@Entity
@Table(name = "aaaa")
public class Aaaa {
    @EmbeddedId
    private PrimaryKey idClass;

    private String name;

    public PrimaryKey getIdClass() {
        return idClass;
    }

    public void setIdClass(PrimaryKey idClass) {
        this.idClass = idClass;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Aaaa{" + "idClass=" + idClass + ", name='" + name + '\'' + '}';
    }
}
